﻿package top.college.cjh;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.Timer;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.Dimension;
import javax.swing.JTabbedPane;
import java.awt.FlowLayout;
import javax.swing.JScrollPane;

// 관리자 메인 페이지
public class Admin_Page_Main_Frame extends JFrame {

	private static Admin_Page_Main_Frame frame;
	private JPanel main_panel;
	private static JPanel info_panel;

	// 메인 - 런 메인페이지 불러오기

	public static void main(String[] args) {

		EventQueue.invokeLater(new Runnable() {

			@Override
			public void run() {

				frame = new Admin_Page_Main_Frame();
				frame.setVisible(true);

			}
		});

	}

	public Admin_Page_Main_Frame() {

		setBounds(300, 300, 1024, 768);
		
		
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		// 상단제어
		JPanel top_panel = new JPanel();
		getContentPane().add(top_panel, BorderLayout.NORTH);
		top_panel.setPreferredSize(new Dimension(1024, 100));
		top_panel.setBounds(100, 100, 1024, 400);
		top_panel.setLayout(new BoxLayout(top_panel, BoxLayout.Y_AXIS));

		// 인포패널
		info_panel = new Admin_Info_Temp(); 
		
		
		JPanel menubar = new JPanel();
		makeMenuButton(menubar);
		top_panel.add(menubar);

	
		JPanel toolbar = new JPanel();
		makeToolPanel(toolbar);

		top_panel.add(toolbar);

		
		// 본문패널
		main_panel = new JPanel();

		getContentPane().add(main_panel, BorderLayout.CENTER);

		setVisible(true);
		
		
	}

	
// 툴패널
	private void toolPanel() {

		JPanel top = new JPanel();
		makeToolPanel(top);

		
	}

	// 툴바패널 
	private void makeToolPanel(JPanel p) {

		JButton cgStu_btn = new JButton("툴바");
		p.add(cgStu_btn);
		JButton cgEmpo_btn = new JButton("확인");
		p.add(cgEmpo_btn);
		JButton btnAdmin = new JButton("창");
		p.add(btnAdmin);

	}

	// 메뉴 패널
	private void makeMenuButton(JPanel p) {

		JButton home = new JButton("HOME");
		p.add(home);
		
		
		JButton depart = new JButton("학사정보 관리");
		p.add(depart);

		JButton prof = new JButton("교직원 관리");
		p.add(prof);
	
		JButton admin = new JButton("Admin");
		p.add(admin);

	}

	
	// 인포패널 - 현재상태 off
		private void makeCategori(){
			
			info_panel.setLayout( new BoxLayout( info_panel, BoxLayout.Y_AXIS ) );
			
			
			JButton departs = new JButton("학과 정보");
			
			JButton stu = new JButton( "학생 정보");
			JButton sub = new JButton( "과목 조회");
			
			
			
			JButton ske = new JButton( "일정 조회");
			
			
			
			
		info_panel.add( departs );	
		info_panel.add( stu );
		info_panel.add( sub );
		info_panel.add( ske );	
		}
		

}